package main

import (
	"fmt"
	"math"
	"strings"
)

func BinaryFormat(num int64) string {
	stringBin := strings.Builder{}
	c := int64(math.Pow(2, 31))
	for i := 0; i < 32; i++ {
		if num&c != 0 {
			stringBin.WriteString("1")
		} else {
			stringBin.WriteString("0")
		}
		c >>= 1
	}
	return stringBin.String()
}

func main() {
	fmt.Printf("%s\n", BinaryFormat(260))
	fmt.Printf("%s\n", BinaryFormat(-260))
	fmt.Printf("%s\n", BinaryFormat(9898))
}
